import { Field, InputType, PartialType } from '@nestjs/graphql';
@InputType()
export class ProductInput {
  @Field({
    description: '名称',
    nullable: true,
  })
  name: string;
  @Field({
    description: '描述',
    nullable: true,
  })
  desc: string;
  @Field({
    description: '库存总数',
    nullable: true,
  })
  stock: number;
//   @Field({
//     description: '当前库存',
//     nullable: true,
//   })
//   curStock: number;
//   @Field({
//     description: '卖出去多少',
//     nullable: true,
//   })
//   buyNumber: number;
  @Field({
    description: '每人限购数量',
    nullable: true,
  })
  limitBuyNumber: number;
  @Field({
    description: '封面图',
    nullable: true,
  })
  coverUrl: string;
  @Field({
    description: '头部Banner',
    nullable: true,
  })
  bannerUrl: string;
  @Field({
    description: '原价',
    nullable: true,
  })
  orginalPrice: number;
  @Field({
    description: '优惠价',
    nullable: true,
  })
  preferentialPrice: number;
  @Field(()=>[String],{
    description: '消费卡',
    nullable: true,
  })
  cards?: string[];

}
@InputType()
export class PartialProductInput extends PartialType(ProductInput){}
